package geoway.bmf.keycloak.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;


/**
 * @author yrt
 * @description
 * @date 2022/12/3 15:45
 */
@FeignClient(value = "keycloak-service", url = "${keycloak.auth-server-url}")
public interface KeycloakClient {

    @PostMapping(value = "/realms/${keycloak.realm}/protocol/openid-connect/token",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    Object login(@RequestHeader("Content-Type") String contenyType,@RequestBody MultiValueMap<String, Object> param);
}